<template>
<div id="app">
  <button class="logout-btn" @click="logout">退出登录</button>
  <img alt="Vue logo" src="./assets/logo.png">
  <HelloWorld msg="Welcome to Your Vue.js App"/>
  </div>
</template>

<script>
import HelloWorld from './components/HelloWorld.vue'

export default {
  name: 'App',
  components: {
    HelloWorld
  }
  , methods: {
    logout() {
      sessionStorage.setItem('showLogin', '1')
      this.$router.push('/LoginApp')
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px; 
}
.logout-btn {
  position: fixed;     
  right: 20px;         
  bottom: 20px;        
  background-color: blue; 
  color: white;        
  border: none;        
  padding: 10px 20px;  
  border-radius: 4px;  
  cursor: pointer;     
  z-index: 999;         
}
</style>
